﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Class="UnitFundProfitability.UnitFunds"
	x:Name="Window"
	Title="UnitFunds"
	Width="640" Height="480">

	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="*"/>
			<RowDefinition Height="4*"/>
		</Grid.RowDefinitions>
		<StackPanel Grid.Row="0">
			<TextBlock Text="Existing companies" Margin="10"/>
			<ComboBox Name="ExistingCompanies" ItemsSource="{Binding}" Margin="10">
				<ComboBox.ItemTemplate>
					<DataTemplate>
						<TextBlock Text="{Binding CompanyName}"/>
					</DataTemplate>
				</ComboBox.ItemTemplate>
			</ComboBox>
		</StackPanel>
		<Grid Grid.Row="1">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*"/>
				<ColumnDefinition Width="*"/>
			</Grid.ColumnDefinitions>
			<DataGrid Grid.Column="0" Name="ExistingUnitFunds" AutoGenerateColumns="False" IsReadOnly="True" ItemsSource="{Binding}" Margin="10">
				<DataGrid.Columns>
					<DataGridTextColumn Width="*" Header="Unit fund name" Binding="{Binding FundName}"/>
				</DataGrid.Columns>
			</DataGrid>
			<Grid Grid.Column="1">
				<Grid.RowDefinitions>
					<RowDefinition Height="*"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="*"/>
				</Grid.RowDefinitions>
				<StackPanel Grid.Row="0">
					<TextBlock Text="Unit fund name" Margin="10,0"/>
					<TextBox Name="UnitFundName" Margin="10,0"/>
				</StackPanel>
				<StackPanel Grid.Row="1">
					<TextBlock Text="Markdown period" Margin="10,0"/>
					<TextBox Name="MarkdownPeriod" Margin="10,0"/>
				</StackPanel>
				<Button Grid.Row="2" Content="Add unit fund" Name="AddUnitFund" Margin="10"/>
				<Button Grid.Row="3" Content="Update unit fund" Name="UpdateUnitFund" Margin="10"/>
			</Grid>
		</Grid>
	</Grid>
</Window>